<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>document16</title>
</head>

<body>
    <script>
        new Promise((resolve, reject) => {
            //reject('error');
            resolve('success');
        }).then(value => {
            console.log(value);
            console.log(222);
        }).then(value => {
            console.log(value); // undefined, then 的返回结果是一个 Promise, 这个返回结果由它指定的回调函数的返回值决定。这里没有 return 语句。所以是 undefined
        }).then(value => {
            console.log(value); // undefined
        }, reason => {
            console.log("reason: "+reason);
        })
    </script>
</body>

</html>
